<template>
  <a-page-header
      style="border: 1px solid rgb(235, 237, 240)"
      :title="title"
      :breadcrumb="{ props: { routes } }"
      :sub-title="subtitle"
  />
</template>
<script>
export default {
  data() {
    return {
      url: "",
      title:"",
      subtitle:"",
      routes: [
        // {
        //   path: 'index',
        //   breadcrumbName: this.one,
        // },
        // {
        //   path: 'first',
        //   breadcrumbName: this.two,
        // },

      ],
    };
  },
  mounted() {
    this.url = window.location.href;
    let name = "";
    if(this.url === "http://localhost:8081/#/index/adminDoctor"){
      name = "医生界面"
      this.title = "医生信息"
      this.subtitle = "医生信息一览"
    }
    else if (this.url ==="http://localhost:8081/#/index/adminPatient"){
      name = "患者界面"
      this.title = "患者信息"
      this.subtitle = "患者信息一览"
    }
    this.routes = [{path: "index", breadcrumbName: "首页"},
      {path: "#", breadcrumbName: name}]
    console.log(this.url);
  }
};
</script>
